﻿using System.Threading;

namespace ESoft.Helpers
{
    /// <summary>
    /// 信号量
    /// </summary>
    public class SemaphoreHelper
    {
        /// <summary>
        /// 创建信号量实例
        /// </summary>
        /// <param name="initialCount">控制访问某资源的线程数量</param>
        /// <returns></returns>
        public SemaphoreSlim CreateSemaphoreSlim(int initialCount)
        {
           return new SemaphoreSlim(initialCount);
        }
    }
}